import WucodeRouter from 'wucode-router'
import indexView from '@/views/index'
import homeView from '@/views/home'
import $ from 'jquery'

// 实例化路由 root就是public/index.html中的挂载点的html的id名称
// const router = new WucodeRouter('root',{mode:'hash/history'})
const router = new WucodeRouter('root')

router.route('/index', (req, res, next) => {
  res.render(indexView())
})


router.route('/home', (req, res, next) => {
  res.render(homeView())

  // 事件，js业务处理
  $('#btn').click(function () {
    console.log('我是一个按钮')
  })
})












